package com.example.mybatisplusdemo.service;

import com.example.mybatisplusdemo.common.JsonResponse;
import com.example.mybatisplusdemo.model.domain.OrderMain;
import com.baomidou.mybatisplus.extension.service.IService;
import com.example.mybatisplusdemo.model.domain.OrderSubmitRequest;
import com.example.mybatisplusdemo.model.dto.OrderDTO;

import java.util.List;

/**
 * <p>
 * 订单详情 服务类
 * </p>
 *
 * @author lqj
 * @since 2025-07-02
 */
public interface IOrderMainService extends IService<OrderMain> {


    JsonResponse submitOrder(OrderSubmitRequest request);

    List<OrderMain> getOrdersByUserId(Long userId);

    int cancelOrder(Long orderId);

    JsonResponse<List<OrderDTO>> getAllOrders();
    boolean deliverOrder(Long orderId);

    boolean confirmReceive(Long orderId);

    JsonResponse<Boolean> applyRefund(Long orderId);

    JsonResponse<Boolean> approveRefund(Long orderId);

    JsonResponse<Boolean> rejectRefund(Long orderId);
}
